package com.graduate.examapp.util

import com.blankj.utilcode.util.RegexUtils

/**
 * Author: etacao
 * Date: 2023/4/11 13:42
 * Description:
 * History:
 * <author> <time> <version> <desc>
 * etacao 2023/4/11 1.0 首次创建
 */
object LoginValidator {
    private const val VALID_PW_LEN = 6
    private val idRegex = Regex("^\\d{11}")
    fun validateId(id: String): Boolean {
        return id.matches(idRegex)
    }
    fun validatePassword(password: String): Boolean {
        return password.length >= VALID_PW_LEN
    }
}